home *** CD-ROM | disk | FTP | other *** search
- Path: news.iag.net!news
- From: jatmon@iag.net (John R Buchan)
- Newsgroups: comp.lang.c
- Subject: Re: SYSTEM CALL RESULT
- Date: 3 Jan 1996 08:56:24 GMT
- Organization: The Internet Access Group, Inc.
- Distribution: world
- Message-ID: <4cdgbo$c1e@news.iag.net>
- References: <4cbn2i$env@bisance.citi2.fr> <820609309snz@intellic.demon.co.uk>
- NNTP-Posting-Host: pm1-orl17.iag.net
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-Newsreader: WinVN 0.99.6
-
- In article <820609309snz@intellic.demon.co.uk>, truemanc@intellic.demon.co.uk
- says...
- >
- >In article <4cbn2i$env@bisance.citi2.fr>
- > labed@math-info.univ-paris5.fr "A.Labed" writes:
- >
- >>
- >>Hi,
- >>
- >>Is there a way to get the result of a
- >>system call within a C program.
- >>example :
- >
- >
- >The exit value of a process is returned by the system call. Therefore
- >if you wrote a small script which computed the line count of the
- >current list of processes and then exited with this value you could
- >pick it up as the return value of the system call.
-
- Maybe, on your current system with your current compiler, but, if anything
- changes, all bets are off.
-
- K&R II - B5 - P253:
-
- int system( const char *s)
- system passes the string s to the environment for execution. If s is
- NULL, system returns non-zero if there is a command processor. If s
- is not NULL, the return value is implementation-dependent.
-
- --
- John R Buchan -:|:- Looking for that elusive FAQ? ftp to:
- jatmon@mail.iag.net -:|:- rtfm.mit.edu /pub/usenet-by-group/....
-
-